# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=black-hole-solver
pkgver=1.10.1
pkgrel=1
pkgdesc="Solvers and statistics for 'Golf' solitaire, 'Black Hole' solitaire, 'All in a Row' solitaire and related card patience games."
arch=(x86_64)
url="https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/"
license=(MIT)
depends=(glibc)
makedepends=(cmake perl-path-tiny rinutils python)
source=(https://fc-solve.shlomifish.org/downloads/fc-solve/black-hole-solver-$pkgver.tar.xz)
sha256sums=('36e1953a99e02e82489a3cb109fb590bcab307b4ddaec34cb0e67347668511e2')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_STATIC_LIBRARY=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname-$pkgver/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
